pathbar: Handle webdav where is the root is a path
authorOlivier Crête <olivier.crete@collabora.com>
Thu, 13 Apr 2023 22:09:48 +0000 (16:09 -0600)
committerOlivier Crête <olivier.crete@collabora.com>
Thu, 13 Apr 2023 23:54:57 +0000 (17:54 -0600)
commitc271cd1a3f76b2256ea173322cebdb246e08a453
treecd4a6ed0c9a5425e10692d680488f24d0bcef7ca
parent64a196929351d8fb33f621eee9b643caece03caf
pathbar: Handle webdav where is the root is a path

Our webdav server has a root which is davs://mynextcloud/remote.php/webdav
When once creates a GFile out of or out of a subdirectory, and one call
g_file_get_parent(), it recurses too far up and try to query
davs://mynextcloud/remote.php which fails, resulting in a broken pathbar.

To fix that, before querying the metadata of each element of the path,
I query the "enclosing mount", then use it's root to compare the GFile
against.

With the right GMount, we can also fix the icon drawing code in the
pathbar for network drives.
gtk/gtkpathbar.c